<?php
$mysqli= new mysqli("localhost","root","root","db_blw");
if($mysqli->connect_errno){
    die();
}
$title=$_GET["title"];
$img_url=$_GET["img_url"];
$price=$_GET["price"];
$quantity=$_GET["quantity"];

$result=$mysqli->query("INSERT INTO trolley (title,img_url,price,quantity) VALUES ('{$title}','{$img_url}',{$price},{$quantity})");

$result2=$mysqli->query("select * from trolley");

echo $result2->num_rows;